﻿#define _CRT_SECURE_NO_WARNINGS 1

//编程初学者入门训练第101题
//BC103 序列重组矩阵
//https://www.nowcoder.com/practice/7548f8f5e44c42fa84fb2323d899a966?tpId=107&tqId=33384&rp=1&ru=/exam/oj/ta&qru=/exam/oj/ta&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D2%26tpId%3D107%26type%3D107&difficulty=undefined&judgeStatus=undefined&tags=&title=

#include <stdio.h>

int main() {
    int n = 0;
    int m = 0;
    scanf("%d %d", &n, &m);
    int arr[10][10];
    //输入
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            scanf("%d", &arr[i][j]);
        }
    }
    //输出
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < m; j++) {
            printf("%d ", arr[i][j]);
        }
        printf("\n");
    }
    return 0;
}